/******************************************************************************
* project: automatic_alarm_free_rtos_based
* chip: STM32F407VG
* compiler: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.6.2
* 	20110921 (release) [ARM/embedded-4_6-branch revision 182083]
*
* prefix: (none)
*
* available global functions:
*
* available local functions:
*
*
* available interrupt handlers:
*
* Created on: Mar 15, 2013
*      Author: podol
*
******************************************************************************/

#ifndef STM_USART_H_
#define STM_USART_H_

#include "stm32f4xx.h"


#define myClock 		168000000ul
#define myBaud 			115200ul
#define myCrystal		8000000ul

/*------------------------------------------------------------------------*//**
* \brief Configures and initialize the USART2.
* \details
*
* \param [in] void
*//*-------------------------------------------------------------------------*/
void usart2_init(uint32_t BAUD, uint32_t apbclock);

/*------------------------------------------------------------------------*//**
* \brief Configures and initialize the USART1.
* \details
*
* \param [in] void
*//*-------------------------------------------------------------------------*/
void usart1_init(uint32_t BAUD, uint32_t apbclock);

/*------------------------------------------------------------------------*//**
* \brief Put a char to USARTx.
* \details
*
* \param [in] void
*//*-------------------------------------------------------------------------*/
void usart_putchar(USART_TypeDef* myUSART, uint32_t data);

/*------------------------------------------------------------------------*//**
* \brief Put a string to USARTx.
* \details
*
* \param [in] void
*//*-------------------------------------------------------------------------*/
void usart_putstr(USART_TypeDef* myUSART, char *data);



#endif /* STM_USART_H_ */
